const app = getApp()
Page({
  data: {
	content:[],
  },

  onLoad(options) {
    const newsId = options.ksid;
    // 模拟从后台获取新闻详情数据
    const newsData = this.loadKeshiData(newsId);
    
  },
async loadKeshiData(newsId) {
	  var that = this
    try {
      // 模拟API请求
      app.util.request({
              url: 'Keshi/detail',
              data: {
				  id:newsId
              },
              success(res) {
                var data = res.data.data;
      			var list = data.keshi
				console.log(list)
				console.log(data)
                that.setData({
                    content: list.content
                });
              }
      })
    } catch (error) {
      this.setData({ isLoading: false })
      wx.showToast({ title: '加载失败', icon: 'none' })
    }
  },
});